﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace giaoxuhaison.Common
{
    public interface IBuildGridDataHelper<T> where T:class
    {
        string BuildDataForGrid(List<T> sources, Func<T, string[]> generateCellValues,
             string sortName, string sortOrder, int rowsPerPage, int rowId, int page,
             string searchField, string searchOper, string searchString);

        string BuildDataForPerformanceGrid(List<T> sources, Func<T, string[]> generateCellValues,
             string sortName, string sortOrder, int rowsPerPage, int rowId, int page,
             string searchField, string searchOper, string searchString, JsonResult totalValues);

        string BuildDataForLazyGrid(List<T> sources, Func<T, string[]> generateCellValues, GridModel gridInfo);

        string BuildDataForInitiationGrid(List<T> sources, Func<T, string[]> generateCellValues,
             string sortName, string sortOrder, int rowsPerPage, int rowId, int page,
             string searchField, string searchOper, string searchString, JsonResult totalValues);
    }
}